Skip to content

[OGUI-1674] Add deployment controller and endpoint - #2999

Merged
graduta merged 5 commits into
devfrom
feature/COG/OGUI-1674/add-deployment-controller
Aug 12, 2025
Merged

[OGUI-1674] Add deployment controller and endpoint#2999
graduta merged 5 commits into
devfrom
feature/COG/OGUI-1674/add-deployment-controller

Conversation

@graduta

@graduta graduta commented Aug 12, 2025

Copy link
Copy Markdown
Member

I have JIRA issue created

  • branch and/or PR name(s) includes JIRA ID
  • issue has "Fix version" assigned
  • issue "Status" is set to "In review"
  • PR labels are selected
  • FLP integration tests were ran successful

PR which:

  • adds a deployment controller which validates the deployment request and calls the deployment service
  • adds new endpoint for deployments which:
    • logs the request
    • checks user has minimum needed role
    • checks user has ownership of needed locks
    • makes use of the new controller to request the deployment

@graduta graduta self-assigned this Aug 12, 2025
@graduta
graduta requested a review from Copilot August 12, 2025 15:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a deployment controller and endpoint to enable environment deployments via the AliECS system. The implementation includes proper validation, authentication, and authorization checks to ensure only authorized users with the required locks can initiate deployments.

  • Adds a new DeploymentController that validates deployment requests and interfaces with a deployment service
  • Implements a new POST /deploy endpoint with comprehensive middleware for authentication, authorization, and logging
  • Introduces proper request validation requiring either workflowTemplate or selectedConfiguration parameters

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
Control/lib/api.js Integrates the new deployment controller and endpoint with required middleware chain
Control/lib/controllers/Deployment.controller.js Implements the deployment controller with request validation and error handling
Control/lib/middleware/logDeploymentRequest.middleware.js Adds middleware for logging deployment requests with user context
Control/lib/typedefs/DeploymentRequest.js Defines the TypeScript-style typedef for deployment request structure
Control/test/lib/controllers/mocha-deployment.controller.js Unit tests for the deployment controller functionality
Control/test/api/deployment/api-post-deployment.test.js Integration tests for the deployment API endpoint
Control/test/mocha-index.js Includes the new test files in the test suite

Comment thread Control/test/lib/controllers/mocha-deployment.controller.js Outdated
Comment thread Control/test/api/deployment/api-post-deployment.test.js Outdated
Comment thread Control/lib/middleware/logDeploymentRequest.middleware.js Outdated
@graduta
graduta merged commit 723fff8 into dev Aug 12, 2025
9 checks passed
@graduta
graduta deleted the feature/COG/OGUI-1674/add-deployment-controller branch August 12, 2025 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants